package com.qf.feign;

import com.qf.pojo.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author 千峰教育
 * @Company http://www.mobiletrain.org/
 * @Version 1.0
 */
//feign 的调用方， 指定 feign被调用方 服务名称
@FeignClient(value = "QF-GOODS")
public interface GoodsFeign {

    @GetMapping("/goods/index")
    public String index();


    @GetMapping("/findById/{id}")
    public Goods findById(@PathVariable Integer id);

    @GetMapping("/findById")
    public Goods findById2(@RequestParam("id") Integer id);

    @GetMapping("/goods/save")
    public String save(Goods goods);
}
